PRINT "Item ", COUNT, ": ", NUM( COUNT ) ' Print out the item
The number of items in an array is called the length
of the array.
When you ask for an array with a DIM
statement,
you say what the subscripts will be, and this determines the length.
For example,
Length | |
dim stuff(1 to 5) | 5 |
dim glue(1 to 745) | 745 |
dim days$(1 to 7) | 7 |
When the array is created with subscripts 1 TO NUMBER
,
then there are NUMBER
of slots in the array.
Look at the following piece of a program:
LET LENGTH = 9 DIM MYDATA( 1 TO LENGTH )
What is the length of the array MYDATA
?